<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- /fasttmp/mkdist-qt-4.3.5-1211793125/qtopia-core-opensource-src-4.3.5/src/gui/image/qmovie.cpp -->
<head>
  <title>Qt 4.3: QMovie Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td>
<td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
<td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 align="center">QMovie Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1>
<p>The QMovie class is a convenience class for playing movies with <a href="qimagereader.html">QImageReader</a>. <a href="#details">More...</a></p>
<pre> #include &lt;QMovie&gt;</pre><p>Inherits <a href="qobject.html">QObject</a>.</p>
<ul>
<li><a href="qmovie-members.html">List of all members, including inherited members</a></li>
<li><a href="qmovie-qt3.html">Qt 3 support members</a></li>
</ul>
<a name="public-types"></a>
<h3>Public Types</h3>
<ul>
<li><div class="fn"/>enum <b><a href="qmovie.html#CacheMode-enum">CacheMode</a></b> { CacheNone, CacheAll }</li>
<li><div class="fn"/>enum <b><a href="qmovie.html#MovieState-enum">MovieState</a></b> { NotRunning, Paused, Running }</li>
</ul>
<a name="properties"></a>
<h3>Properties</h3>
<ul>
<li><div class="fn"/><b><a href="qmovie.html#cacheMode-prop">cacheMode</a></b> : CacheMode</li>
<li><div class="fn"/><b><a href="qmovie.html#speed-prop">speed</a></b> : int</li>
</ul>
<ul>
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<a name="public-functions"></a>
<h3>Public Functions</h3>
<ul>
<li><div class="fn"/><b><a href="qmovie.html#QMovie">QMovie</a></b> ( QObject * <i>parent</i> = 0 )</li>
<li><div class="fn"/><b><a href="qmovie.html#QMovie-2">QMovie</a></b> ( QIODevice * <i>device</i>, const QByteArray &amp; <i>format</i> = QByteArray(), QObject * <i>parent</i> = 0 )</li>
<li><div class="fn"/><b><a href="qmovie.html#QMovie-3">QMovie</a></b> ( const QString &amp; <i>fileName</i>, const QByteArray &amp; <i>format</i> = QByteArray(), QObject * <i>parent</i> = 0 )</li>
<li><div class="fn"/><b><a href="qmovie.html#dtor.QMovie">~QMovie</a></b> ()</li>
<li><div class="fn"/>QColor <b><a href="qmovie.html#backgroundColor">backgroundColor</a></b> () const</li>
<li><div class="fn"/>CacheMode <b><a href="qmovie.html#cacheMode-prop">cacheMode</a></b> () const</li>
<li><div class="fn"/>int <b><a href="qmovie.html#currentFrameNumber">currentFrameNumber</a></b> () const</li>
<li><div class="fn"/>QImage <b><a href="qmovie.html#currentImage">currentImage</a></b> () const</li>
<li><div class="fn"/>QPixmap <b><a href="qmovie.html#currentPixmap">currentPixmap</a></b> () const</li>
<li><div class="fn"/>QIODevice * <b><a href="qmovie.html#device">device</a></b> () const</li>
<li><div class="fn"/>QString <b><a href="qmovie.html#fileName">fileName</a></b> () const</li>
<li><div class="fn"/>QByteArray <b><a href="qmovie.html#format">format</a></b> () const</li>
<li><div class="fn"/>int <b><a href="qmovie.html#frameCount">frameCount</a></b> () const</li>
<li><div class="fn"/>QRect <b><a href="qmovie.html#frameRect">frameRect</a></b> () const</li>
<li><div class="fn"/>bool <b><a href="qmovie.html#isValid">isValid</a></b> () const</li>
<li><div class="fn"/>bool <b><a href="qmovie.html#jumpToFrame">jumpToFrame</a></b> ( int <i>frameNumber</i> )</li>
<li><div class="fn"/>int <b><a href="qmovie.html#loopCount">loopCount</a></b> () const</li>
<li><div class="fn"/>int <b><a href="qmovie.html#nextFrameDelay">nextFrameDelay</a></b> () const</li>
<li><div class="fn"/>QSize <b><a href="qmovie.html#scaledSize">scaledSize</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qmovie.html#setBackgroundColor">setBackgroundColor</a></b> ( const QColor &amp; <i>color</i> )</li>
<li><div class="fn"/>void <b><a href="qmovie.html#cacheMode-prop">setCacheMode</a></b> ( CacheMode <i>mode</i> )</li>
<li><div class="fn"/>void <b><a href="qmovie.html#setDevice">setDevice</a></b> ( QIODevice * <i>device</i> )</li>
<li><div class="fn"/>void <b><a href="qmovie.html#setFileName">setFileName</a></b> ( const QString &amp; <i>fileName</i> )</li>
<li><div class="fn"/>void <b><a href="qmovie.html#setFormat">setFormat</a></b> ( const QByteArray &amp; <i>format</i> )</li>
<li><div class="fn"/>void <b><a href="qmovie.html#setScaledSize">setScaledSize</a></b> ( const QSize &amp; <i>size</i> )</li>
<li><div class="fn"/>int <b><a href="qmovie.html#speed-prop">speed</a></b> () const</li>
<li><div class="fn"/>MovieState <b><a href="qmovie.html#state">state</a></b> () const</li>
</ul>
<ul>
<li><div class="fn"/>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
</ul>
<a name="public-slots"></a>
<h3>Public Slots</h3>
<ul>
<li><div class="fn"/>bool <b><a href="qmovie.html#jumpToNextFrame">jumpToNextFrame</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qmovie.html#setPaused">setPaused</a></b> ( bool <i>paused</i> )</li>
<li><div class="fn"/>void <b><a href="qmovie.html#speed-prop">setSpeed</a></b> ( int <i>percentSpeed</i> )</li>
<li><div class="fn"/>void <b><a href="qmovie.html#start">start</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qmovie.html#stop">stop</a></b> ()</li>
</ul>
<ul>
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
</ul>
<a name="signals"></a>
<h3>Signals</h3>
<ul>
<li><div class="fn"/>void <b><a href="qmovie.html#error">error</a></b> ( QImageReader::ImageReaderError <i>error</i> )</li>
<li><div class="fn"/>void <b><a href="qmovie.html#finished">finished</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qmovie.html#frameChanged">frameChanged</a></b> ( int <i>frameNumber</i> )</li>
<li><div class="fn"/>void <b><a href="qmovie.html#resized">resized</a></b> ( const QSize &amp; <i>size</i> )</li>
<li><div class="fn"/>void <b><a href="qmovie.html#started">started</a></b> ()</li>
<li><div class="fn"/>void <b><a href="qmovie.html#stateChanged">stateChanged</a></b> ( QMovie::MovieState <i>state</i> )</li>
<li><div class="fn"/>void <b><a href="qmovie.html#updated">updated</a></b> ( const QRect &amp; <i>rect</i> )</li>
</ul>
<ul>
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
</ul>
<a name="static-public-members"></a>
<h3>Static Public Members</h3>
<ul>
<li><div class="fn"/>QList&lt;QByteArray&gt; <b><a href="qmovie.html#supportedFormats">supportedFormats</a></b> ()</li>
</ul>
<ul>
<li><div class="fn"/>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
</ul>
<a name="details"></a>
<hr />
<h2>Detailed Description</h2>
<p>The QMovie class is a convenience class for playing movies with <a href="qimagereader.html">QImageReader</a>.</p>
<p>First, create a QMovie object by passing either the name of a file or a pointer to a <a href="qiodevice.html">QIODevice</a> containing an animated image format to QMovie's constructor. You can call <a href="qmovie.html#isValid">isValid</a>() to check if the image data is valid, before starting the movie. To start the movie, call <a href="qmovie.html#start">start</a>(). QMovie will enter <a href="qmovie.html#MovieState-enum">Running</a> state, and emit <a href="qmovie.html#started">started</a>() and <a href="qmovie.html#stateChanged">stateChanged</a>(). To get the current state of the movie, call <a href="qmovie.html#state">state</a>().</p>
<p>To display the movie in your application, you can pass your QMovie object to <a href="qlabel.html#setMovie">QLabel::setMovie</a>(). Example:</p>
<pre> QLabel label;
 QMovie *movie = new QMovie(&quot;animations/fire.gif&quot;);

 label.setMovie(movie);
 movie-&gt;start();</pre>
<p>Whenever a new frame is available in the movie, QMovie will emit <a href="qmovie.html#updated">updated</a>(). If the size of the frame changes, <a href="qmovie.html#resized">resized</a>() is emitted. You can call <a href="qmovie.html#currentImage">currentImage</a>() or <a href="qmovie.html#currentPixmap">currentPixmap</a>() to get a copy of the current frame. When the movie is done, QMovie emits <a href="qmovie.html#finished">finished</a>(). If any error occurs during playback (i.e, the image file is corrupt), QMovie will emit <a href="qmovie.html#error">error</a>().</p>
<p>You can control the speed of the movie playback by calling <a href="qmovie.html#speed-prop">setSpeed</a>(), which takes the percentage of the original speed as an argument. Pause the movie by calling setPaused(true). QMovie will then enter <a href="qmovie.html#MovieState-enum">Paused</a> state and emit <a href="qmovie.html#stateChanged">stateChanged</a>(). If you call setPaused(false), QMovie will reenter <a href="qmovie.html#MovieState-enum">Running</a> state and start the movie again. To stop the movie, call <a href="qmovie.html#stop">stop</a>().</p>
<p>Certain animation formats allow you to set the background color. You can call <a href="qmovie.html#setBackgroundColor">setBackgroundColor</a>() to set the color, or <a href="qmovie.html#backgroundColor">backgroundColor</a>() to retrieve the current background color.</p>
<p><a href="qmovie.html#currentFrameNumber">currentFrameNumber</a>() returns the sequence number of the current frame. The first frame in the animation has the sequence number 0. <a href="qmovie.html#frameCount">frameCount</a>() returns the total number of frames in the animation, if the image format supports this. You can call <a href="qmovie.html#loopCount">loopCount</a>() to get the number of times the movie should loop before finishing. <a href="qmovie.html#nextFrameDelay">nextFrameDelay</a>() returns the number of milliseconds the current frame should be displayed.</p>
<p>QMovie can be instructed to cache frames of an animation by calling <a href="qmovie.html#cacheMode-prop">setCacheMode</a>().</p>
<p>Call <a href="qmovie.html#supportedFormats">supportedFormats</a>() for a list of formats that QMovie supports.</p>
<p>See also <a href="qlabel.html">QLabel</a>, <a href="qimagereader.html">QImageReader</a>, and <a href="widgets-movie.html">Movie Example</a>.</p>
<hr />
<h2>Member Type Documentation</h2>
<h3 class="fn"><a name="CacheMode-enum"></a>enum QMovie::CacheMode</h3>
<p>This enum describes the different cache modes of <a href="qmovie.html">QMovie</a>.</p>
<p><table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QMovie::CacheNone</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">No frames are cached (the default).</td></tr>
<tr><td valign="top"><tt>QMovie::CacheAll</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">All frames are cached.</td></tr>
</table></p>
<h3 class="fn"><a name="MovieState-enum"></a>enum QMovie::MovieState</h3>
<p>This enum describes the different states of <a href="qmovie.html">QMovie</a>.</p>
<p><table border="1" cellpadding="2" cellspacing="1" width="100%">
<tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr>
<tr><td valign="top"><tt>QMovie::NotRunning</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The movie is not running. This is <a href="qmovie.html">QMovie</a>'s initial state, and the state it enters after <a href="qmovie.html#stop">stop</a>() has been called or the movie is finished.</td></tr>
<tr><td valign="top"><tt>QMovie::Paused</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The movie is paused, and <a href="qmovie.html">QMovie</a> stops emitting <a href="qmovie.html#updated">updated</a>() or <a href="qmovie.html#resized">resized</a>(). This state is entered after calling <a href="qmovie-qt3.html#pause">pause</a>() or setPaused(true). The current frame number it kept, and the movie will continue with the next frame when <a href="qmovie-qt3.html#unpause">unpause</a>() or setPaused(false) is called.</td></tr>
<tr><td valign="top"><tt>QMovie::Running</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">The movie is running.</td></tr>
</table></p>
<hr />
<h2>Property Documentation</h2>
<h3 class="fn"><a name="cacheMode-prop"></a>cacheMode : <a href="qmovie.html#CacheMode-enum">CacheMode</a></h3>
<p>This property holds the movie's cache mode.</p>
<p>Caching frames can be useful when the underlying animation format handler that <a href="qmovie.html">QMovie</a> relies on to decode the animation data does not support jumping to particular frames in the animation, or even &quot;rewinding&quot; the animation to the beginning (for looping). Furthermore, if the image data comes from a sequential device, it is not possible for the underlying animation handler to seek back to frames whose data has already been read (making looping altogether impossible). To aid in such situations, <a href="qmovie.html">QMovie</a> can be instructed to cache the frames, at the added memory cost of keeping the frames in memory for the lifetime of the <a href="qmovie.html">QMovie</a>.</p>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>CacheMode cacheMode () const</b></li>
<li><div class="fn"/><b>void setCacheMode ( CacheMode <i>mode</i> )</b></li>
</ul>
<p>See also <a href="qmovie.html#CacheMode-enum">QMovie::CacheMode</a>.</p>
<h3 class="fn"><a name="speed-prop"></a>speed : int</h3>
<p>This property holds the movie's speed.</p>
<p>The speed is measured in percentage of the original movie speed. The default speed is 100%. Example:</p>
<pre> QMovie movie(&quot;racecar.gif&quot;);
 movie.setSpeed(200); <span class="comment">//</span> 2x speed</pre>
<p>Access functions:</p>
<ul>
<li><div class="fn"/><b>int speed () const</b></li>
<li><div class="fn"/><b>void setSpeed ( int <i>percentSpeed</i> )</b></li>
</ul>
<hr />
<h2>Member Function Documentation</h2>
<h3 class="fn"><a name="QMovie"></a>QMovie::QMovie ( <a href="qobject.html">QObject</a> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qmovie.html">QMovie</a> object, passing the <i>parent</i> object to <a href="qobject.html">QObject</a>'s constructor.</p>
<p>See also <a href="qmovie.html#setFileName">setFileName</a>(), <a href="qmovie.html#setDevice">setDevice</a>(), and <a href="qmovie.html#setFormat">setFormat</a>().</p>
<h3 class="fn"><a name="QMovie-2"></a>QMovie::QMovie ( <a href="qiodevice.html">QIODevice</a> * <i>device</i>, const <a href="qbytearray.html">QByteArray</a> &amp; <i>format</i> = QByteArray(), <a href="qobject.html">QObject</a> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qmovie.html">QMovie</a> object. <a href="qmovie.html">QMovie</a> will use read image data from <i>device</i>, which it assumes is open and readable. If <i>format</i> is not empty, <a href="qmovie.html">QMovie</a> will use the image format <i>format</i> for decoding the image data. Otherwise, <a href="qmovie.html">QMovie</a> will attempt to guess the format.</p>
<p>The <i>parent</i> object is passed to <a href="qobject.html">QObject</a>'s constructor.</p>
<h3 class="fn"><a name="QMovie-3"></a>QMovie::QMovie ( const <a href="qstring.html">QString</a> &amp; <i>fileName</i>, const <a href="qbytearray.html">QByteArray</a> &amp; <i>format</i> = QByteArray(), <a href="qobject.html">QObject</a> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qmovie.html">QMovie</a> object. <a href="qmovie.html">QMovie</a> will use read image data from <i>fileName</i>. If <i>format</i> is not empty, <a href="qmovie.html">QMovie</a> will use the image format <i>format</i> for decoding the image data. Otherwise, <a href="qmovie.html">QMovie</a> will attempt to guess the format.</p>
<p>The <i>parent</i> object is passed to <a href="qobject.html">QObject</a>'s constructor.</p>
<h3 class="fn"><a name="dtor.QMovie"></a>QMovie::~QMovie ()</h3>
<p>Destructs the <a href="qmovie.html">QMovie</a> object.</p>
<h3 class="fn"><a name="backgroundColor"></a><a href="qcolor.html">QColor</a> QMovie::backgroundColor () const</h3>
<p>Returns the background color of the movie. If no background color has been assigned, an invalid <a href="qcolor.html">QColor</a> is returned.</p>
<p>See also <a href="qmovie.html#setBackgroundColor">setBackgroundColor</a>().</p>
<h3 class="fn"><a name="currentFrameNumber"></a>int QMovie::currentFrameNumber () const</h3>
<p>Returns the sequence number of the current frame. The number of the first frame in the movie is 0.</p>
<h3 class="fn"><a name="currentImage"></a><a href="qimage.html">QImage</a> QMovie::currentImage () const</h3>
<p>Returns the current frame as a <a href="qimage.html">QImage</a>.</p>
<p>See also <a href="qmovie.html#currentPixmap">currentPixmap</a>() and <a href="qmovie.html#updated">updated</a>().</p>
<h3 class="fn"><a name="currentPixmap"></a><a href="qpixmap.html">QPixmap</a> QMovie::currentPixmap () const</h3>
<p>Returns the current frame as a <a href="qpixmap.html">QPixmap</a>.</p>
<p>See also <a href="qmovie.html#currentImage">currentImage</a>() and <a href="qmovie.html#updated">updated</a>().</p>
<h3 class="fn"><a name="device"></a><a href="qiodevice.html">QIODevice</a> * QMovie::device () const</h3>
<p>Returns the device <a href="qmovie.html">QMovie</a> reads image data from. If no device has currently been assigned, 0 is returned.</p>
<p>See also <a href="qmovie.html#setDevice">setDevice</a>() and <a href="qmovie.html#fileName">fileName</a>().</p>
<h3 class="fn"><a name="error"></a>void QMovie::error ( <a href="qimagereader.html#ImageReaderError-enum">QImageReader::ImageReaderError</a> <i>error</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted by <a href="qmovie.html">QMovie</a> when the error <i>error</i> occurred during playback. <a href="qmovie.html">QMovie</a> will stop the movie, and enter <a href="qmovie.html#MovieState-enum">QMovie::NotRunning</a> state.</p>
<h3 class="fn"><a name="fileName"></a><a href="qstring.html">QString</a> QMovie::fileName () const</h3>
<p>Returns the name of the file that <a href="qmovie.html">QMovie</a> reads image data from. If no file name has been assigned, or if the assigned device is not a file, an empty <a href="qstring.html">QString</a> is returned.</p>
<p>See also <a href="qmovie.html#setFileName">setFileName</a>() and <a href="qmovie.html#device">device</a>().</p>
<h3 class="fn"><a name="finished"></a>void QMovie::finished ()&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the movie has finished.</p>
<p>See also <a href="qmovie.html#stop">QMovie::stop</a>().</p>
<h3 class="fn"><a name="format"></a><a href="qbytearray.html">QByteArray</a> QMovie::format () const</h3>
<p>Returns the format that <a href="qmovie.html">QMovie</a> uses when decoding image data. If no format has been assigned, an empty QByteArray() is returned.</p>
<p>See also <a href="qmovie.html#setFormat">setFormat</a>().</p>
<h3 class="fn"><a name="frameChanged"></a>void QMovie::frameChanged ( int <i>frameNumber</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the frame number has changed to <i>frameNumber</i>. You can call <a href="qmovie.html#currentImage">currentImage</a>() or <a href="qmovie.html#currentPixmap">currentPixmap</a>() to get a copy of the frame.</p>
<p>This function was introduced in Qt 4.1.</p>
<h3 class="fn"><a name="frameCount"></a>int QMovie::frameCount () const</h3>
<p>Returns the number of frames in the movie.</p>
<p>Certain animation formats do not support this feature, in which case 0 is returned.</p>
<h3 class="fn"><a name="frameRect"></a><a href="qrect.html">QRect</a> QMovie::frameRect () const</h3>
<p>Returns the rect of the last frame. If no frame has yet been updated, an invalid <a href="qrect.html">QRect</a> is returned.</p>
<p>See also <a href="qmovie.html#currentImage">currentImage</a>() and <a href="qmovie.html#currentPixmap">currentPixmap</a>().</p>
<h3 class="fn"><a name="isValid"></a>bool QMovie::isValid () const</h3>
<p>Returns true if the movie is valid (e.g&#x2e;, the image data is readable and the image format is supported); otherwise returns false.</p>
<h3 class="fn"><a name="jumpToFrame"></a>bool QMovie::jumpToFrame ( int <i>frameNumber</i> )</h3>
<p>Jumps to frame number <i>frameNumber</i>. Returns true on success; otherwise returns false.</p>
<h3 class="fn"><a name="jumpToNextFrame"></a>bool QMovie::jumpToNextFrame ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Jumps to the next frame. Returns true on success; otherwise returns false.</p>
<h3 class="fn"><a name="loopCount"></a>int QMovie::loopCount () const</h3>
<p>Returns the number of times the movie will loop before it finishes. If the movie will only play once (no looping), loopCount returns 0. If the movie loops forever, loopCount returns -1.</p>
<p>Note that, if the image data comes from a sequential device (e.g&#x2e; a socket), <a href="qmovie.html">QMovie</a> can only loop the movie if the <a href="qmovie.html#cacheMode-prop">cacheMode</a> is set to <a href="qmovie.html#CacheMode-enum">QMovie::CacheAll</a>.</p>
<h3 class="fn"><a name="nextFrameDelay"></a>int QMovie::nextFrameDelay () const</h3>
<p>Returns the number of milliseconds <a href="qmovie.html">QMovie</a> will wait before updating the next frame in the animation.</p>
<h3 class="fn"><a name="resized"></a>void QMovie::resized ( const <a href="qsize.html">QSize</a> &amp; <i>size</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the current frame has been resized to <i>size</i>. This effect is sometimes used in animations as an alternative to replacing the frame. You can call <a href="qmovie.html#currentImage">currentImage</a>() or <a href="qmovie.html#currentPixmap">currentPixmap</a>() to get a copy of the updated frame.</p>
<h3 class="fn"><a name="scaledSize"></a><a href="qsize.html">QSize</a> QMovie::scaledSize ()</h3>
<p>Returns the scaled size of frames.</p>
<p>This function was introduced in Qt 4.1.</p>
<p>See also <a href="qmovie.html#setScaledSize">setScaledSize</a>() and <a href="qimagereader.html#scaledSize">QImageReader::scaledSize</a>().</p>
<h3 class="fn"><a name="setBackgroundColor"></a>void QMovie::setBackgroundColor ( const <a href="qcolor.html">QColor</a> &amp; <i>color</i> )</h3>
<p>For image formats that support it, this function sets the background color to <i>color</i>.</p>
<p>See also <a href="qmovie.html#backgroundColor">backgroundColor</a>().</p>
<h3 class="fn"><a name="setDevice"></a>void QMovie::setDevice ( <a href="qiodevice.html">QIODevice</a> * <i>device</i> )</h3>
<p>Sets the current device to <i>device</i>. <a href="qmovie.html">QMovie</a> will read image data from this device when the movie is running.</p>
<p>See also <a href="qmovie.html#device">device</a>() and <a href="qmovie.html#setFormat">setFormat</a>().</p>
<h3 class="fn"><a name="setFileName"></a>void QMovie::setFileName ( const <a href="qstring.html">QString</a> &amp; <i>fileName</i> )</h3>
<p>Sets the name of the file that <a href="qmovie.html">QMovie</a> reads image data from, to <i>fileName</i>.</p>
<p>See also <a href="qmovie.html#fileName">fileName</a>(), <a href="qmovie.html#setDevice">setDevice</a>(), and <a href="qmovie.html#setFormat">setFormat</a>().</p>
<h3 class="fn"><a name="setFormat"></a>void QMovie::setFormat ( const <a href="qbytearray.html">QByteArray</a> &amp; <i>format</i> )</h3>
<p>Sets the format that <a href="qmovie.html">QMovie</a> will use when decoding image data, to <i>format</i>. By default, <a href="qmovie.html">QMovie</a> will attempt to guess the format of the image data.</p>
<p>You can call <a href="qmovie.html#supportedFormats">supportedFormats</a>() for the full list of formats <a href="qmovie.html">QMovie</a> supports.</p>
<p>See also <a href="qmovie.html#format">format</a>() and <a href="qimagereader.html#supportedImageFormats">QImageReader::supportedImageFormats</a>().</p>
<h3 class="fn"><a name="setPaused"></a>void QMovie::setPaused ( bool <i>paused</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>If <i>paused</i> is true, <a href="qmovie.html">QMovie</a> will enter <a href="qmovie.html#MovieState-enum">Paused</a> state and emit stateChanged(Paused); otherwise it will enter <a href="qmovie.html#MovieState-enum">Running</a> state and emit stateChanged(Running).</p>
<p>See also <a href="qmovie-qt3.html#paused">paused</a>() and <a href="qmovie.html#state">state</a>().</p>
<h3 class="fn"><a name="setScaledSize"></a>void QMovie::setScaledSize ( const <a href="qsize.html">QSize</a> &amp; <i>size</i> )</h3>
<p>Sets the scaled frame size to <i>size</i>.</p>
<p>This function was introduced in Qt 4.1.</p>
<p>See also <a href="qmovie.html#scaledSize">scaledSize</a>() and <a href="qimagereader.html#setScaledSize">QImageReader::setScaledSize</a>().</p>
<h3 class="fn"><a name="start"></a>void QMovie::start ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Starts the movie. <a href="qmovie.html">QMovie</a> will enter <a href="qmovie.html#MovieState-enum">Running</a> state, and start emitting <a href="qmovie.html#updated">updated</a>() and <a href="qmovie.html#resized">resized</a>() as the movie progresses.</p>
<p>If <a href="qmovie.html">QMovie</a> is in the <a href="qmovie.html#MovieState-enum">Paused</a> state, this function is equivalent to calling setPaused(false). If <a href="qmovie.html">QMovie</a> is already in the <a href="qmovie.html#MovieState-enum">Running</a> state, this function does nothing.</p>
<p>See also <a href="qmovie.html#stop">stop</a>() and <a href="qmovie.html#setPaused">setPaused</a>().</p>
<h3 class="fn"><a name="started"></a>void QMovie::started ()&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted after <a href="qmovie.html#start">QMovie::start</a>() has been called, and <a href="qmovie.html">QMovie</a> has entered <a href="qmovie.html#MovieState-enum">QMovie::Running</a> state.</p>
<h3 class="fn"><a name="state"></a><a href="qmovie.html#MovieState-enum">MovieState</a> QMovie::state () const</h3>
<p>Returns the current state of <a href="qmovie.html">QMovie</a>.</p>
<p>See also <a href="qmovie.html#MovieState-enum">MovieState</a> and <a href="qmovie.html#stateChanged">stateChanged</a>().</p>
<h3 class="fn"><a name="stateChanged"></a>void QMovie::stateChanged ( <a href="qmovie.html#MovieState-enum">QMovie::MovieState</a> <i>state</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted every time the state of the movie changes. The new state is specified by <i>state</i>.</p>
<p>See also <a href="qmovie.html#state">QMovie::state</a>().</p>
<h3 class="fn"><a name="stop"></a>void QMovie::stop ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Stops the movie. <a href="qmovie.html">QMovie</a> enters <a href="qmovie.html#MovieState-enum">NotRunning</a> state, and stops emitting <a href="qmovie.html#updated">updated</a>() and <a href="qmovie.html#resized">resized</a>(). If <a href="qmovie.html#start">start</a>() is called again, the movie will restart from the beginning.</p>
<p>If <a href="qmovie.html">QMovie</a> is already in the <a href="qmovie.html#MovieState-enum">NotRunning</a> state, this function does nothing.</p>
<p>See also <a href="qmovie.html#start">start</a>() and <a href="qmovie.html#setPaused">setPaused</a>().</p>
<h3 class="fn"><a name="supportedFormats"></a><a href="qlist.html">QList</a>&lt;<a href="qbytearray.html">QByteArray</a>&gt; QMovie::supportedFormats ()&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Returns the list of image formats supported by <a href="qmovie.html">QMovie</a>.</p>
<p>This function was introduced in Qt 4.1.</p>
<p>See also <a href="qimagereader.html#supportedImageFormats">QImageReader::supportedImageFormats</a>().</p>
<h3 class="fn"><a name="updated"></a>void QMovie::updated ( const <a href="qrect.html">QRect</a> &amp; <i>rect</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the rect <i>rect</i> in the current frame has been updated. You can call <a href="qmovie.html#currentImage">currentImage</a>() or <a href="qmovie.html#currentPixmap">currentPixmap</a>() to get a copy of the updated frame.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="30%">Copyright &copy; 2008 <a href="trolltech.html">Trolltech</a></td>
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
<td width="30%" align="right"><div align="right">Qt 4.3.5</div></td>
</tr></table></div></address></body>
</html>
